<template>
  <h1>一个人的信息</h1>
  <input type="text" v-focus="true" v-model="inputValue">
  <Hello :hello="inputValue" :xiaoyu="18"></Hello>
  <p>坐标信息：{{x}}-{{y}}</p>
</template>

<script>
import Hello from "./hello.vue"
import {ref} from 'vue'
import { useMouse } from './hooks/mouse'
export default {
  directives:{
    focus:{mounted:(el)=>el.focus()}
  },
  components:{
    Hello
  },
  setup(){
    const { x, y } = useMouse()
    const inputValue=ref("hi")
    return {inputValue,x,y}
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
